FROM ubuntu:18.04

ARG SOFTWARE_BASE_URL

COPY aliyun-apt-sources /etc/apt/sources.list

RUN apt update \
	&& apt install -y wget \
	&& apt install -y curl \
	&& apt install -y net-tools \
	&& apt install -y inetutils-ping \
	&& apt install -y nano \
	&& apt install -y unzip \
    && apt install -y build-essential \
    && apt install -y pkg-config \
    && apt install -y gdb gdbserver \
	&& apt-get clean && apt-get autoclean
    

RUN mkdir /app && cd /app \
    && wget -O cmake-3.22.5-linux-x86_64.tar.gz $SOFTWARE_BASE_URL/cmake-3.22.5-linux-x86_64.tar.gz \
    && tar -xzf cmake-3.22.5-linux-x86_64.tar.gz \
    && mv cmake-3.22.5-linux-x86_64 /opt/cmake-3.22.5 \
    && ln -s /opt/cmake-3.22.5 /opt/cmake \
    && cd /  && rm -rf /app
   
ENV PATH /opt/cmake/bin:$PATH

